package com.iwat.annotation;

import java.lang.annotation.*;

/**
 * @Author wangweiqiang
 * @Classname Dict
 * @Date 2023/9/22 10:32
 * @Description 字典：select
 * di.item_value
 * from
 * dict d
 * inner join dict_item di on d.id = di.dict_id
 * where
 * dict_code = #{dictCode}
 * and di.item_code = #{curValue}
 * 外键：select dictText  from dictTable where dictCode = #{curValue}
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Dict {


    /**
     * 字典编码
     *
     * @return
     */
    String dictCode();

    /**
     * 字典文本
     *
     * @return
     */
    String dictText() default "";

    /**
     * 字典表
     *
     * @return
     */
    String dictTable() default "";
}
